<!DOCTYPE html>
<html>
<head>
    <title>测试结果汇总</title>
    <style>
        .fail {
            color: red;
			width: 7emem;
			text-align: center;
        }
        .success {
            color: green;
			width: 7emem;
			text-align: center;
        }
		.details-col-elapsed {
			width: 7em;
			text-align: center;
		}
		.details-col-msg {
			width: 10em;
			text-align: center;
			background-color:#66ffcc;
		}

    </style>
</head>
<body>
<div>
    <br>
    <br>
    <table border="thin" cellspacing="0" cellpadding="5" width="95%" align="center">
        <tr colspan="4" bgcolor="#ffe4c4" style="font-size: 30px">
            <td colspan="7" align="center">自动化测试报告:</td>
        </tr>
        <tr align="center" style="font-size: 20px">
            <td width="10%">执行总数：{{result.execute_sum}}</td>
            <td width="8%">成功个数:{{result.success_num}}</td>
            <td width="8%">失败个数:{{result.fail_sum}}</td>
            <td width="12%">执行成功率:{{result.percent}}</td>
            <td width="25%">执行开始时间:{{result.test_start_time}}</td>
            <td width="25%">执行结束时间:{{result.test_end_time}}</td>
            <td width="35%">执行时间:{{result.test_duration_time}}</td>
        </tr>
    </table>

    <br>
    <table  border="thin" cellspacing="0" cellpadding="3"  width="95%" style="margin: auto;">
        <tr  style="font-size: 20px">
            <th class='details-col-msg' >编号</th>
            <th class='details-col-msg' >用例批次</th>
            <th class='details-col-msg' >case编号</th>
            <th class='details-col-msg' >case描述</th>
            <th class='details-col-msg' >所属模块</th>
            <th class='details-col-msg' >执行结果</th>
            <th class='details-col-msg' >用例开始时间</th>
            <th class='details-col-msg' >用例结束时间</th>
            <th class='details-col-msg' >执行时间</th>
            <th class='details-col-msg' >报错信息</th>
            <th class='details-col-msg' >执行人</th>
            <th class='details-col-msg' >操作</th>
        </tr>
        {% for r in result.case_detail_list %}
        <tr style="font-size: 16px">
            <td class='details-col-elapsed' >{{ loop.index }}</td>
            <td class='details-col-elapsed' >{{ r.batch_info }}</td>
            <td class='details-col-elapsed'>{{ r.caseid }}</td>
            <td class='details-col-elapsed'>{{ r.desc }}</td>
            <td class='details-col-elapsed'>{{ r.module }}</td>
            <td class="{{'success' if r.res=='success' else 'fail' }}">{{ 'success' if r.res=='success' else 'fail' }} </td>
            <td class='details-col-elapsed'>{{ r.case_start_time }}</td>
            <td class='details-col-elapsed'>{{ r.case_end_time }}</td>
            <td class='details-col-elapsed'>{{ r.run_time }}</td>
            <td class='details-col-elapsed'>{{ r.res_info }}</td>
            <td class='details-col-elapsed'>{{ r.opetator }}</td>
            <td><a href="/r/{{ r.caseid }}/">执行</a></td>
        </tr>
        {% endfor %}

    </table>
</div>
</body>
</html>